<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/datapicker/bootstrap-datetimepicker.min.css}" rel="stylesheet"/>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-account-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">账号：</label>
				<div class="col-sm-8">
					<input id="userName" name="userName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">手机号：</label>
				<div class="col-sm-8">
					<input id="mobile" name="mobile" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">注册邮箱：</label>
				<div class="col-sm-8">
					<input id="email" name="email" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">性别：</label>
				<div class="col-sm-8">
				   <select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
	                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
	                </select>
				</div>
			</div>
			
			
			<div class="form-group">	
				<label class="col-sm-3 control-label">使用状态：</label>
				<div class="col-sm-8">
					<select name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_normal_disable')}">
	                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
	                </select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">真实姓名：</label>
				<div class="col-sm-8">
					<input id="realName" name="realName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">登录密码：</label>
				<div class="col-sm-8">
					<input id="loginPasswd" name="loginPasswd" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">支付密码：</label>
				<div class="col-sm-8">
				  <input id="payPasswd" name="payPasswd" type="hidden">
				  <input id="payPasswd0" name="payPasswd0" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">证件类型：</label>
				<div class="col-sm-8">
					<select name="certificateType" class="form-control m-b" th:with="type=${@dict.getType('certificate_type')}">
	                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
	                </select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">证件号码：</label>
				<div class="col-sm-8">
					<input id="certificateCode" name="certificateCode" class="form-control" type="text">
				</div>
			</div>
			
		</form>
	</div>
    <div th:include="include::footer"></div>
     <script th:src="@{/ajax/libs/datapicker/bootstrap-datetimepicker.min.js}"></script>
     <script th:src="@{/js/crypto/crypto-js.js}"></script>
     <script th:src="@{/js/crypto/cipher-core.js}"></script>
     <script th:src="@{/js/crypto/aes.js}"></script>
     <script th:src="@{/js/crypto/sha256.js}"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    	 $(".input-group.date").datetimepicker({
      	   format: "yyyy-mm-dd hh:mm:ss",
      	   minView: "month",
      	   autoclose: true
      	 });
    })
		var prefix = ctx + "manager/account"
		$("#form-account-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
   
		function submitHandler() {
			//支付密码SHA256
			var payPasswd0= $("#payPasswd0").val();
			var payPasswd = CryptoJS.SHA256(payPasswd0).toString();
			$("#payPasswd").val(payPasswd);
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-account-add').serialize());
	        }
	    }
	</script>
</body>
</html>
